﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HorizontalMenu.ascx.cs" Inherits="Dune.Web.Controls.HorizontalMenu" %>
<div class="menu">
<ul class="sf-menu sf-navbar">
<asp:Repeater runat="server" ID="rprMenu">
<ItemTemplate>
<li <%# (bool)DataBinder.Eval(Container.DataItem, "Current") ?  "class=\"current\"" : ""%> >
<a href='<%# DataBinder.Eval(Container.DataItem, "UrlPath")%>'><%# DataBinder.Eval(Container.DataItem, "Name")%></a>
    <asp:Repeater DataSource='<%# DataBinder.Eval(Container.DataItem, "Childrens")%>' runat="server" ID="rprSubMenu">
        <HeaderTemplate><ul></HeaderTemplate>
        <ItemTemplate>
            <li <%# (bool)DataBinder.Eval(Container, "DataItem.Current") ?  "class=\"current\"" : ""%> >
                <a href='<%# DataBinder.Eval(Container, "DataItem.UrlPath")%>'><%# DataBinder.Eval(Container, "DataItem.Name")%></a>
            </li>
        </ItemTemplate>
        <FooterTemplate></ul></FooterTemplate>
        </asp:Repeater>
</li>
</ItemTemplate>    
</asp:Repeater>
</ul>
</div>
